home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_gimp.idb / usr / freeware / share / gimp / scripts / clothify.scm.z / clothify.scm
Encoding:
GIMP Script-Fu Script  |  1999-07-21  |  1.8 KB  |  54 lines

  1. ; CLOTHIFY version 1.02
  2. ; Gives the current layer in the indicated image a cloth-like texture.
  3. ; Process invented by Zach Beane (Xath@irc.gimp.net)
  4. ;
  5. ; Tim Newsome <drz@froody.bloke.com> 4/11/97
  6.  
  7. (define (script-fu-clothify timg tdrawable bx by azimuth elevation depth)
  8.     (let* (
  9.         (width (car (gimp-drawable-width tdrawable)))
  10.         (height (car (gimp-drawable-height tdrawable)))
  11.         (img (car (gimp-image-new width height RGB)))
  12. ;        (layer-two (car (gimp-layer-new img width height RGB "Y Dots" 100 MULTIPLY)))
  13.         (layer-one (car (gimp-layer-new img width height RGB "X Dots" 100 NORMAL))))
  14.  
  15.     (gimp-image-disable-undo img)
  16.     (gimp-edit-fill img layer-one)
  17. ;    (gimp-edit-fill img layer-two)
  18.     (gimp-image-add-layer img layer-one 0)
  19.  
  20.     (plug-in-noisify 1 img layer-one FALSE 0.7 0.7 0.7 0.7)
  21.  
  22.     (set! layer-two (car (gimp-layer-copy layer-one 0)))
  23.     (gimp-layer-set-mode layer-two MULTIPLY)
  24.     (gimp-image-add-layer img layer-two 0)
  25.  
  26.     (plug-in-gauss-rle 1 img layer-one bx TRUE FALSE)
  27.     (plug-in-gauss-rle 1 img layer-two by FALSE TRUE)
  28.     (gimp-image-flatten img)
  29.     (set! bump-layer (car (gimp-image-get-active-layer img)))
  30.  
  31.     (plug-in-c-astretch 1 img bump-layer)
  32.     (plug-in-noisify 1 img bump-layer FALSE 0.2 0.2 0.2 0.2)
  33.  
  34.     (plug-in-bump-map 1 img tdrawable bump-layer azimuth elevation depth 0 0 0 0 FALSE FALSE 0)
  35.     (gimp-image-delete img)
  36.     (gimp-displays-flush)
  37. ))
  38.  
  39.  
  40. (script-fu-register "script-fu-clothify"
  41.             "<Image>/Script-Fu/Alchemy/Clothify"
  42.             "Render the specified text along the perimeter of a circle"
  43.             "Tim Newsome <drz@froody.bloke.com>"
  44.             "Tim Newsome"
  45.             "4/11/97"
  46.             "RGB*, GRAY*"
  47.             SF-IMAGE "Input Image" 0
  48.             SF-DRAWABLE "Input Drawable" 0
  49.             SF-VALUE "X Blur" "9"
  50.             SF-VALUE "Y Blur" "9"
  51.             SF-VALUE "Azimuth" "135"
  52.             SF-VALUE "Elevation" "45"
  53.             SF-VALUE "Depth" "3")
  54.